<html>
<head><meta charset="utf-8"><title>incremental comp Q&#x27;s · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html">incremental comp Q&#x27;s</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="175897692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175897692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175897692">(Sep 17 2019 at 11:45)</a>:</h4>
<p>hey <span class="user-mention" data-user-id="124287">@mw</span> I figured I might as well ask some questions out in the open</p>



<a name="175897737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175897737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175897737">(Sep 17 2019 at 11:45)</a>:</h4>
<p>i've been using the case of recompiling an unchanged source tree as an initial point for better understanding the incr comp code, specifically dep-graph</p>



<a name="175897792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175897792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175897792">(Sep 17 2019 at 11:46)</a>:</h4>
<p>I had mentioned to you earlier that we unconditionally emit the dep graph on every compile, regardless of whether the input changed.</p>



<a name="175897881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175897881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175897881">(Sep 17 2019 at 11:47)</a>:</h4>
<p><span aria-label="question" class="emoji emoji-2753" role="img" title="question">:question:</span> We do have the previous serialized graph already loaded, so I looked into comparing the serialized current graph and the previous one. Interestingly, they differ. Does that surprise you, <span class="user-mention" data-user-id="124287">@mw</span> ?</p>



<a name="175897973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175897973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175897973">(Sep 17 2019 at 11:48)</a>:</h4>
<p>(I have not yet exactly dissected the manner in which they differ; all I mean right now is that the in-memory graph representation differs. I'm hopeful that the abstract dep-graphs they each represent is in fact the same, but I have not yet confirmed that.)</p>



<a name="175898363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175898363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175898363">(Sep 17 2019 at 11:55)</a>:</h4>
<p>(if I had parallel_compiler turned on, then of course the order of insertions and thus the assigned indices for the dep-nodes would differ. But I don't think my testing configuration has parallel_compiler turned on.)</p>



<a name="175901452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901452">(Sep 17 2019 at 12:40)</a>:</h4>
<p>the representations are tailored for their respective purpose</p>



<a name="175901487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901487">(Sep 17 2019 at 12:41)</a>:</h4>
<p>i.e. the current dep-graph is set up in a way that allows for building it quickly</p>



<a name="175901494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901494">(Sep 17 2019 at 12:41)</a>:</h4>
<p>sure, but post converting the current graph to its serialized form</p>



<a name="175901501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901501">(Sep 17 2019 at 12:41)</a>:</h4>
<p>and the serialized dep-graph should require little post-processing after loading</p>



<a name="175901530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901530">(Sep 17 2019 at 12:41)</a>:</h4>
<p>that is, i'm just talking about comparing two instances of SerializedDepGraph</p>



<a name="175901574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901574">(Sep 17 2019 at 12:42)</a>:</h4>
<p>there are a few things that differ because not everything is a proper query</p>



<a name="175901584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901584">(Sep 17 2019 at 12:42)</a>:</h4>
<p>but it sounds like you are not surprised to hear they differ</p>



<a name="175901681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901681">(Sep 17 2019 at 12:43)</a>:</h4>
<p>there's this mostly: <a href="https://github.com/rust-lang/rust/blob/5670d048c0f88af9976b5505c7853b23dd06770d/src/librustc/dep_graph/graph.rs#L956-L967" target="_blank" title="https://github.com/rust-lang/rust/blob/5670d048c0f88af9976b5505c7853b23dd06770d/src/librustc/dep_graph/graph.rs#L956-L967">https://github.com/rust-lang/rust/blob/5670d048c0f88af9976b5505c7853b23dd06770d/src/librustc/dep_graph/graph.rs#L956-L967</a></p>



<a name="175901706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901706">(Sep 17 2019 at 12:43)</a>:</h4>
<p>ah I missed that</p>



<a name="175901759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/incremental%20comp%20Q%27s/near/175901759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/incremental.20comp.20Q&#x27;s.html#175901759">(Sep 17 2019 at 12:44)</a>:</h4>
<p>it's easy to miss :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>